package com.fr.web.platform;

import com.fr.base.Inter;
import com.fr.web.platform.core.DriverURLName;
import java.util.HashMap;
import java.util.Map;

public class PlatformConstants
{
  public static Map jdbcMap = new HashMap();

  static
  {
    jdbcMap.put("Others", new DriverURLName[] { new DriverURLName("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:"), new DriverURLName("org.hsqldb.jdbcDriver", "jdbc:hsqldb:file:[PATH_TO_DB_FILES]"), new DriverURLName("com.inet.tds.TdsDriver", "jdbc:inetdae7:localhost:1433/"), new DriverURLName("COM.cloudscape.JDBCDriver", "jdbc:cloudscape:/cloudscape/"), new DriverURLName("com.internetcds.jdbc.tds.Driver", "jdbc:freetds:sqlserver://localhost/") });
    jdbcMap.put("Oracle", new DriverURLName[] { new DriverURLName("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@localhost:1521:databaseName") });
    jdbcMap.put("DB2", new DriverURLName[] { new DriverURLName("com.ibm.db2.jcc.DB2Driver", "jdbc:db2://localhost:50000/") });
    jdbcMap.put("SQL Server", new DriverURLName[] { new DriverURLName("com.microsoft.sqlserver.jdbc.SQLServerDriver", "jdbc:sqlserver://localhost:1433;databaseName=") });
    jdbcMap.put("MySQL", new DriverURLName[] { new DriverURLName("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/"), new DriverURLName("org.gjt.mm.mysql.Driver", "jdbc:mysql://localhost/") });
    jdbcMap.put("Sybase", new DriverURLName[] { new DriverURLName("com.sybase.jdbc2.jdbc.SybDriver", "jdbc:sybase:Tds:localhost:5000/") });
    jdbcMap.put("Access", new DriverURLName[] { new DriverURLName("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=") });
    jdbcMap.put("Derby", new DriverURLName[] { new DriverURLName("org.apache.derby.jdbc.ClientDriver", "jdbc:derby://localhost:1527/") });
    jdbcMap.put("Postgre", new DriverURLName[] { new DriverURLName("org.postgresql.Driver", "jdbc:postgresql://localhost:5432/") });
  }

  public static final class DB
  {
    public static final String START = "1";
  }

  public static final class Message
  {
    public static final String FROM = "fr_from";
    public static final String ERROR = "fr_error";
    public static final String PLATFORM_ERROR = "fr_platform_error";
  }

  public static final class Default
  {
    public static final String USER = "admin";
    public static final String PASSWORD = "admin";
  }

  public static final class OP
  {
    public static final String FR_ = "fr_";
    public static final String FR_PLATFORM = "fr_platform";
    public static final String FR_PLATFORM_TEST = "fr_platform_test";
    public static final String FR_MODULE = "fr_module";
    public static final String FR_PLATFORM_MANAGE = "fr_platform_manage";
    public static final String FR_PLATFORM_MANAGERS = "fr_platform_managers";
    public static final String FR_PLATFORM_MANAGERS_SAVE = "fr_platform_managers_save";
    public static final String FR_PLATFORM_MANAGE_ALL_CONTROL = "fr_platform_manage_all_control";
    public static final String FR_PLATFORM_MANAGE_LIST_ALL = "fr_platform_manage_list_all";
    public static final String FR_PLATFORM_MANAGE_ALL_CONTROL_SAVE = "fr_platform_manage_all_control_save";
    public static final String FR_PLATFORM_MANAGE_PERMISSION_CONTROL = "fr_platform_manage_permission_control";
    public static final String FR_PLATFORM_MANAGE_PERMISSION_CONTROL_SAVE = "fr_platform_manage_permission_control_save";
    public static final String FR_PLATFORM_MANAGE_NO_CONTROL = "fr_platform_manage_no_control";
    public static final String FR_PLATFORM_MANAGE_NO_CONTROL_SAVE = "fr_platform_manage_no_control_save";
    public static final String FR_SERVER = "fr_server";
    public static final String FR_SERVER_TESTMAIL = "fr_server_testmail";
    public static final String FR_SERVER_EMAILATTRSET = "fr_server_emailattrset";
    public static final String FR_SERVER_GETMAILINFO = "fr_server_getmailinfo";
    public static final String FR_SERVER_GETCACHEINFO = "fr_server_getcacheinfo";
    public static final String FR_SERVER_CACHEATTRSET = "fr_server_cacheattrset";
    public static final String FR_SERVER_GETCONFIGINFO = "fr_server_getconfiginfo";
    public static final String FR_SERVER_CONFIGATTRSET = "fr_server_configattrset";
    public static final String FR_SERVER_GETCONPOOLINFO = "fr_server_getconpoolinfo";
    public static final String FR_SERVER_GETCONNECTIONINFO = "fr_server_getconnectioninfo";
    public static final String FR_SERVER_CONNECTIONATTRSET = "fr_server_connectionattrset";
    public static final String FR_PRIVILEGE = "fr_privilege";
    public static final String FR_PRIVILEGE_USER_TYPE = "fr_privilege_user_type";
    public static final String FR_PRIVILEGE_TYPE_TABLEDATA = "fr_privilege_type_tabledata";
    public static final String FR_PRIVILEGE_TYPE_TABLEDATA_SAVE = "fr_privilege_type_tabledata_save";
    public static final String FR_PRIVILEGE_TYPE_LDAP = "fr_privilege_type_ldap";
    public static final String FR_PRIVILEGE_TYPE_LDAP_SAVE = "fr_privilege_type_ldap_save";
    public static final String FR_PRIVILEGE_TYPE_HTTP = "fr_privilege_type_http";
    public static final String FR_PRIVILEGE_TYPE_HTTP_SAVE = "fr_privilege_type_http_save";
    public static final String FR_PRIVILEGE_TYPE_NULL = "fr_privilege_type_null";
    public static final String FR_PRIVILEGE_TYPE_NULL_SAVE = "fr_privilege_type_null_save";
    public static final String FR_PRIVILEGE_ROLE_TYPE = "fr_privilege_role_type";
    public static final String FR_PRIVILEGE_ROLES = "fr_privilege_roles";
    public static final String FR_PRIVILEGE_ROLES_SAVE = "fr_privilege_roles_save";
    public static final String FR_PRIVILEGE_ROLES_REFRESH = "fr_privilege_roles_refresh";
    public static final String FR_PRIVILEGE_GET_ROLES = "fr_privilege_get_roles";
    public static final String FR_PRIVILEGE_ROLES_TREE = "fr_privilege_roles_tree";
    public static final String FR_PRIVILEGE_PERMISSION_CONTROL = "fr_privilege_permission_control";
    public static final String FR_PRIVILEGE_PERMISSION_CONTROL_SAVE = "fr_privilege_permission_control_save";
    public static final String FR_GETUSERINFO = "fr_getuserinfo";
    public static final String FR_PRIVILEGE_NO_CONTROL = "fr_privilege_no_control";
    public static final String FR_PRIVILEGE_NO_CONTROL_SAVE = "fr_privilege_no_control_save";
    public static final String LOGIN_UI = "auth_loginui";
    public static final String LOGIN_PLATFORM_UI = "auth_loginplatformui";
    public static final String LOGIN = "auth_login";
    public static final String LOGOUT = "auth_logout";
  }

  public static final class InnerParameter
  {
    public static final String PLATFORM_USERNAME = "platform_user";
    public static final String PLATFORM_AUTHORITY = "platform_authority";
    public static final String PLATFORM_AUTHENTICATION_KEY = "platform_authentication_key";
    public static final String PRIVILEGE_USERNAME = "fr_username";
    public static final String PRIVILEGE_AUTHORITY = "fr_authority";
    public static final String PRIVILEGE_OUTER_AUTHORITY = "fr_free_authority";
    public static final String PRIVILEGE_AUTHENCATION_KEY = "fr_authentication_key";
    public static final String[] PRIVILEGE_AUTHENCATION_ALL = { "fr_authentication_key", "fr_username", "fr_authority" };
  }

  public static final class ColumnName
  {
    public static final String PROPERTY_ID = "ID";
    public static final String PROPERTY_NAME = "propertyName";
    public static final String PROPERTY_VALUE = "propertyValue";
    public static final String USERNAME = "username";
    public static final String PASSWORD = "password";
    public static final String AUTHORIED = "authoried";
    public static final String AUTOREDIRECT = "autoredirect";
    public static final String LOGINPATH = "loginpath";
  }

  public static final class TableName
  {
    public static final String PRIVILEGE_PROPERTY = "privilege_property";
    public static final String PLATFORM_MANAGER = "fr_platform";
  }

  public static final class ConnectionName
  {
    public static final String PLATFORM_CONNECTION = "fr_platform";
  }

  public static final class Failure
  {
    public static final String CONNECTION_INFO = "<p style='text-align:center'>" + Inter.getLocText("Platform-DB_Connection_Create_Failure") + "!</p>";
    public static final String TABLE_CREATE_INFO = "<p style='text-align:center'>" + Inter.getLocText("Platform-Table_Create_Failure") + "!</p>";
    public static final String CONNECTION_TEST_INFO = "<p style='text-align:center'>" + Inter.getLocText("Datasource-Connection_failed") + "!</p>";
    public static final String DATA_SAVE_INFO = "<p style='text-align:center'>" + Inter.getLocText("Save") + Inter.getLocText("Failed") + "!</p>";
    public static final String CREATE_TABLE_START = "<p style='text-align:center'>" + Inter.getLocText("Platform-Create_Table");
    public static final String CREATE_TABLE_END = Inter.getLocText("Failed") + "!</p>";
  }

  public static final class Success
  {
    public static final String CONNECTION_INFO = "<p style='text-align:center'>" + Inter.getLocText("Platform-DB_Connection_Create_Successful") + "!</p>";
    public static final String CONNECTION_TEST_INFO = "<p style='text-align:center'>" + Inter.getLocText("Datasource-Connection_successfully") + "!</p>";
    public static final String DATA_SAVE_INFO = "<p style='text-align:center'>" + Inter.getLocText("Saved_successfully") + "!</p>";
    public static final String CREATE_TABLE_START = "<p style='text-align:center'>" + Inter.getLocText("Successfully") + Inter.getLocText("Platform-Create_Table");
    public static final String CREATE_TABLE_END = "!</p>";
  }
}